Computer graphics systems are commonly used for displaying two-and three-dimensional graphics representations of objects on a two-dimensional video display screen. Current computer graphics systems provide highly detailed representations and are used in a variety of applications, such as computer-aided design, animation and the like.
In a typical computer graphics system, an object or model to be represented on the display screen is broken down into graphics primitives. Primitives are basic components of a graphics display and may include, for example, points, lines, triangles, quadrilaterals, triangle strips and polygons. Typically, a hardware/software scheme is implemented to render, or draw, the graphics primitives that represent a view of one or more objects being represented on the display screen.
Generally, the primitives of a three-dimensional object to be rendered are defined by a host computer in terms of primitive data. For example, when the primitive is a triangle, the host computer may define the primitives in terms of the X, Y, Z and W coordinates of its vertices, as well as the red, green, blue and alpha (R, G, B and .alpha.) color values of each vertex. Additional primitive data, such as texture mapping data, may be used in some applications. Rendering hardware interpolates the primitive data to compute the display screen pixels that represent each primitive, and the R, G and B color values for each pixel.
Texture mapping permits objects to be displayed with improved surface detail. Texture mapping is a method that involves mapping a source image, referred to as a texture, onto the surface of a three-dimensional object, and thereafter projecting the textured three-dimensional object to the two-dimensional graphics display screen to display the resulting image. Texture mapping involves applying one or more point elements (texels) of a texture to each point element (pixel) of the displayed portion of the object to which the texture is being mapped. Texture mapping hardware subsystems typically include a local memory cache that stores texture mapping data associated with the portion of the object being rendered.
The basic components of a computer graphics system typically include a host computer and graphics hardware. The host computer may include a graphics application programming and an application programming interface. The application programming interface (API) receives commands from a user through the graphics application program and provides primitive data, as described above, to the graphics hardware. The graphics hardware typically includes a geometry accelerator, a rasterizer and a frame buffer, and may include texture mapping hardware. The geometry accelerator receives primitive data from the host computer and performs operations such as coordinate transformations and lighting, clipping and plane equation calculations for each primitive. The output of the geometry accelerator, referred to as rendering data, is used by the rasterizer and the texture mapping hardware to generate final screen coordinate and color data for each pixel in each primitive. The pixel data from the rasterizer and the pixel data from the texture mapping hardware are combined and stored in the frame buffer for display on the video display screen.
The application programming interface in the host computer frequently utilizes the OpenGL.RTM. standard. (OpenGL is a registered trademark of Silicon Graphics, Inc.) The OpenGL application programming interface provides specific commands that are used to specify objects and operations for generation of graphics displays. OpenGL is a hardware independent interface designed to be implemented on different hardware platforms. As such, in computer systems which support OpenGL, the operating systems and graphics application programs can make calls to the graphics hardware according to the standardized program interface without knowledge of the underlying hardware configuration.
The OpenGL standard provides a complete library of low level graphics manipulation commands for describing models of three-dimensional objects. This standard was originally based on the proprietary standards of Silicon Graphics, Inc., but was later transformed into an open standard which is used in high end graphics-intensive workstations and, more recently, in high end personal computers. The OpenGL standard is described in the OpenGL Programming Guide, Version 1.1 (1997) and the OpenGL Reference Manual, Version 1.1 (1997).
The application programming interface is required to download very large quantities of data to the graphics hardware. For example, the data for a single quadrilateral may be on the order of 64 words of 32 bits each. A single frame of a graphics display typically includes hundreds of thousands of primitives. Thus, the efficiency with which primitive data is downloaded to the graphics hardware, and the speed at which the graphics hardware processes the primitive data, are important factors in achieving high speed in graphics systems.
One inefficiency in the operation of Version 1.0 of the OpenGL application programming interface is the way in which texture mapping data is downloaded to the graphics hardware in connection with display lists. OpenGL commands are placed in a display list, and the commands in the display list are executed in response to additional commands from the application program. Texture map downloading commands in the form of glTexImage commands are stored in the display list. Each time the display list is executed, the glTexImage commands cause the texture mapping data to be downloaded to the graphics hardware. Since the texture mapping data may remain fixed during multiple executions of the display list, the same texture mapping data may be downloaded to the graphics hardware multiple times. This operation is clearly wasteful of available data bandwidth between the host computer and the graphics hardware, and degrades performance.
Accordingly, it is desirable to provide methods and apparatus for processing graphics information in a computer graphics system wherein the repetitive transfer of the same texture mapping data is avoided.